<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>TestJS</title>
</head>
<body>

</body>
<script type="text/javascript">
    let ok=true

    let pro1=new Promise((resolve,reject)=>{
        if (ok){
            resolve('ok')
        }else {
            reject('false')
        }
    })

    pro1.then(okk=>console.log(okk)).catch(rej=>console.log(rej))

    const http=require('http')
</script>
</html>